home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2896 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: jaxnet.jaxnet.com!jax!garyg
  2. From: garyg@jax.jaxnet.com (Gary M. Greenberg)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: File Creation, Read and Write
  5. Date: 24 Jan 1996 21:09:15 GMT
  6. Organization: Southeast Network Services, Inc.
  7. Message-ID: <4e675r$5pp@jaxnet.jaxnet.com>
  8. References: <310479CB.4EFC@teleport.com>
  9. NNTP-Posting-Host: jax.jaxnet.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Curious George, geobonn@teleport.com wrote:
  13. : Hello all:
  14.  
  15. : Can someone please post or e-mail me the easiest and most efficient 
  16. : funtion in C to use to Create, Write and Read from a file. This file 
  17. : would hold Charater stats for a simple Role Playing Game. Any help would 
  18. : be much appreciated.
  19.  
  20. : Thanks,
  21. : George
  22.  
  23. Look up: fopen(),fgets(),sprintf() or fputs(), and fclose(). 
  24. You'll likely need and/or want stdio.h, string.h, stdlib.h
  25. probably find good use for malloc too.
  26.  
  27. Of course, at worst, you could always just do it a character at a time.
  28.  
  29. Seems like you should grab a copy of The C Programming Language, 2nd
  30. Edition by Kerninghan & Ritchie as well as a copy of the c.l.c faq.
  31.  
  32. C'ya,
  33.  
  34. gary    /* the Sorcerer's Apprentice */
  35.  
  36. "Why do we have to hide from the police, Daddy?"
  37. "Because we use vi, honey. They use emacs."
  38. "Unless we're on the Mac. Then we use BBEdit 'cause 'It doesn't suck.'"
  39.